// import { useRouter } from "vue-router";
import Layout from "../layout/Index.vue";
/*
meta.icon 的 选值 官方文档：
    https://element-plus.gitee.io/zh-CN/component/icon.html#icon-collection
*/

import Home from "./module/home";
import Data from "./module/data";
import Other from "./module/other";
import Admin from "./module/admin";
import System from "./module/system";
import dataScreen from "./module/dataScreen";
import idea from "./module/idea";
import use from "./module/use";
import hooks from "./module/hooks";

// 全局路由
const layoutMap = [
  ...Home,
  ...dataScreen,
  ...use,
  ...Other,
  ...System,
  ...idea,
  ...hooks,
];

const routes = [
  {
    path: "/login",
    name: "Login",
    meta: { title: "登录" },
    component: () => import("../views/login/Login.vue"),
  },
  { path: "/", name: "Layout", component: Layout, children: [...layoutMap] },
];

export { routes, layoutMap };
